﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="CreateMember.aspx.cs" Inherits="CreateMember" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .style1
        {
            color: #FF0000;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="Server">
    <div>
        <table id="clickHide">
            <tr>
                <td>
                    Login name</td>
                <td>
                    <asp:TextBox ID="txtUser" runat="server" AutoPostBack="True" />
                    <asp:RequiredFieldValidator ID="rqvLoginName" runat="server" 
                        ControlToValidate="txtUser" ErrorMessage="Please login name" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="cvLoginName" runat="server" 
                        ControlToValidate="txtUser" ErrorMessage="CustomValidator" 
                        onservervalidate="cvLoginName_ServerValidate"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblPassword" runat="server" Text="Password" />
                </td>
                <td>
                    <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" />
                    <asp:RequiredFieldValidator ID="rqvPassword" runat="server" 
                        ControlToValidate="txtPassword" ErrorMessage="Please enter password" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblConfirmPass" runat="server" Text="Confirm Password" />
                </td>
                <td>
                    <asp:TextBox ID="txtConfirmPass" runat="server" TextMode="Password" />
                    <asp:CompareValidator ID="cpvConfirm" runat="server" 
                        ControlToCompare="txtPassword" ControlToValidate="txtConfirmPass" 
                        ErrorMessage="CompareValidator" ForeColor="Red"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblFirstName" runat="server" Text="First Name" />
                </td>
                <td>
                    <asp:TextBox ID="txtFirstName" runat="server" />
                    <asp:RequiredFieldValidator ID="rqvFirstName" runat="server" 
                        ControlToValidate="txtFirstName" CssClass="style1" 
                        ErrorMessage="Please enter fisrt name"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblLastName" runat="server" Text="Last Name" />
                </td>
                <td>
                    <asp:TextBox ID="txtLastName" runat="server" />
                    <asp:RequiredFieldValidator ID="rqvLastName" runat="server" 
                        ControlToValidate="txtLastName" CssClass="style1" 
                        ErrorMessage="Please enter last name"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblEmail" runat="server" Text="Email" />
                </td>
                <td>
                    <asp:TextBox ID="txtEmail" runat="server" />
                    <asp:RegularExpressionValidator ID="revEmail" runat="server" 
                        ControlToValidate="txtEmail" ErrorMessage="right format is: emailname@xyz.ghy" 
                        ForeColor="Red" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                </td>
            </tr>
             <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="Phone" />
                </td>
                <td>
                    <asp:TextBox ID="txtPhone" runat="server" />
                </td>
            </tr>
             <tr>
                <td>
                    <asp:Label ID="Label2" runat="server" Text="Address" />
                </td>
                <td>
                    <asp:TextBox ID="txtAddress" runat="server" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btnCreate" runat="server" Text="Create" BorderColor="Yellow" OnClick="btnCreate_click" />
                </td>
            </tr>
        </table>
    </div>
    <asp:Panel ID="pnlMessage" runat="server" Visible="false">
        <div id="hideMe">
            <asp:Label ID="lblMessage" Text="Successful" runat="server" />
        </div>
    </asp:Panel>
</asp:Content>
